
message SensorMessage
{
        int srcAddress;
        int destAddress;
        double length; //bit
}

message EventNotify extends SensorMessage
{
        int totalSensor;
}

message NotifyDetectTarget extends SensorMessage
{
    
}

message StatusInfo extends SensorMessage
{
        bool hasOldInfoTarget;
        double energy;
        double Info;
}

message TDMA extends SensorMessage
{
        int idSendInfoTarget; //EKF
        int id[25];   
        int timeSlot[25];
}

message SelfTDMA extends SensorMessage
{
        int idSendInfoTarget; //EKF
}

message DataToCH extends SensorMessage
{
        double R_measurement;	
        bool hasOldInfoTarget;
        double X_Old[4]; //EKF
        double P_Old[10]; //EKF  -> Ma tran doi xung 
}

message DataToBS extends SensorMessage
{
        int parentAdress;
        double x;
        double y; 
        double velocity;
}

message RelayRequest extends SensorMessage
{
        
}

message AckRelay extends SensorMessage
{
        double x;
        double y; 
        double energy;
}
message CHSELF extends SensorMessage
{
        
}


message BackOFF extends SensorMessage
{
        
}

message CCA extends SensorMessage
{
}

message CleanChanel extends SensorMessage
{
        double distance;
}

message TurnAroundTime extends SensorMessage
{
        
}

message EnergyRelayInfo extends SensorMessage
{
        double energy;
}

message TargetInfo extends SensorMessage
{
        double X[4];
        double P[10];
        simtime_t value;
}

message NotifySendInfoTarget extends SensorMessage
{
        
}

message ScheduleReset extends SensorMessage
{
        
}

message RequestToSend extends SensorMessage
{
    
}

message CleanToSend extends SensorMessage
{
    
}

message TimeOut extends SensorMessage
{
    
}

message Active extends SensorMessage
{
    simtime_t value;
}

